package com.javapda.c328r.command;

/**
 * 80x60 01h
 * 160x120 03h
 *
 */
public abstract class ComediaPreviewResolution {
	public static final int RES_80x60 = 0x01;
	public static final int RES_160x120 = 0x03;
	public static int convert(String code) {
		if ( code.equals("RES_80x60") ) return RES_80x60;
		if ( code.equals("RES_160x120") ) return RES_160x120;
		throw new RuntimeException("ERROR: unknown preview resolution code: " + code);
	}
	public static String convert(int code) {
		if ( code == RES_80x60 ) return "RES_80x60";
		if ( code == RES_160x120 ) return "RES_160x120";
		throw new RuntimeException("ERROR: unknown preview resolution code: " + code);
	}
	
}
